﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Homework
{
    class Program
    {
        static void Main(string[] args)
        {
            //常量
            const double PI = 3.14;
            int r = 4;
            Console.WriteLine("圆的面积:"+r*r*PI);

            //单一条件的 if 语句
            int x = 13;
            if (x < 17)
            {
                Console.WriteLine("能看到说明是对的!");
            }

            //二选一条件的 if 语句
            int year = 2020;
            if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0)
            {
                Console.WriteLine("是闰年");
            }
            else
            {
                Console.WriteLine("不是闰年");
            }

            //多选一条件的 if 语句
            Console.WriteLine("请输入成绩：");
            int score = int.Parse(Console.ReadLine());
            if (score < 60)
            {
                Console.WriteLine("不及格");
            }else if (score <= 75)
            {
                Console.WriteLine("及格");
            }else if (score <= 90)
            {
                Console.WriteLine("良好");
            }else
            {
                Console.WriteLine("优秀");
            }


            //switch case语句
            Console.WriteLine("请输入产品质量：");
            int num = int.Parse(Console.ReadLine());
            switch (num/20)
            {
                case 5:
                case 4:
                    Console.WriteLine("优质");
                    break;
                case 3:
                    Console.WriteLine("及格");
                    break;
                default:
                    Console.WriteLine("劣质");
                    break;
            }

        }
    }
}
